#include <iostream>

void prime_number(int);

int main()
{
	int number = 1;

	std::cout << "Enter number or -1 to quit" << std::endl;
	
	do
	{
		std::cin >> number;

		if(number != -1)
		{
			prime_number(number);
		}
	}
	while(number != -1);

	return 0;
}

// prime_number function

void prime_number(int num)
{
	bool prime = false;
	int n = 0;

	for(int i = 2; i <= num/2; ++i)
		if(0 == num % i)
		{
			n++;			
		}

	if(0 == n)
	{
		prime = true;
	}

	if(prime)
	{
		std::cout << "is prime" << std::endl;
	}
	else
	{
		std::cout << "is not prime" << std::endl;
	}
}